Ext.define('HardRental.view.desktop.TreePanel', {
	extend : 'Ext.tree.Panel',
    alias : 'widgent.Menu',
    region: 'west',
    border: false,
    useArrows: true,
    cls: 'my-cool-tree',
    width: 200,
    store: Ext.create('HardRental.store.desktop.TreePanel'),
    styleHtmlContent: true,
    rootVisible: false,
    listeners:{
    	itemclick:function(view, record){
			var tabPanel = this.up("viewport").down("tabpanel");
			console.info(tabPanel);
    		console.info("Hizo CLICK : "+record.get("principalView"));
			console.info(record);
    	}
    }
    /*root: {
        text: 'Root',
        expanded: true,
        children: [
            {
                text: 'Child 1',
                leaf: true
            },
            {
                text: 'Child 2',
                leaf: true
            },
            {
                text: 'Child 3',
                expanded: true,
                children: [
                    {
                        text: 'Grandchild',
                        leaf: true
                    }
                ]
            }
        ]
    }*/
});